package be.dch.objectprops.formatter;

import java.math.BigInteger;

public class BigIntegerFormatter implements Formatter {

    @SuppressWarnings("rawtypes")
    public Class getFormatterClass() {
	return BigInteger.class;
    }

    public Object parse(final String input) {
	if (input == null) {
	    return null;
	}
	return new BigInteger(input);
    }

    public String format(final Object input) {
	final BigInteger bd = (BigInteger) input;
	return bd.toString();
    }

    public void parse(final String input, Object result) {
	throw new UnsupportedOperationException("Method parse(String,Object) not supporeted.");
    }
}
